Kanzi 3.9.10
kanzi::NodeCompositor2D Class Reference

Composition functionality for 2D nodes. More...

#include <kanzi/core.ui/node/node_compositor2d.hpp>

Classes

struct  CompositionState
 CompositionState defines the state held by the compositor while Kanzi performs the composition, that is, between calls to beginComposition and blitComposition. More...
 
struct  GeometryState
 GeometryState defines the state used for rendering a quad. More...
 

Public Types

enum  CompositingBits {
  CompositingBitUserTarget , CompositingBitBlend , CompositingBitCache , CompositingBitForce ,
  CompositingBitOffscreen , CompositingBitBlendAndChildren , CompositingBitOpacityAndChildren , CompositingBitPerspective ,
  CompositingBitRequest , CompositingBitEffect , CompositingBitCount
}
 Enum for compositing bit flags. More...
 
enum  PotentialCompositingBits { PotentialCompositingBitCache , PotentialCompositingBitViewport , PotentialCompositingBitCount }
 Enum for compositing potential bit flags. More...
 

Public Member Functions

bool beginComposition (Renderer3D &renderer, CompositionStack &compositionStack, CompositionManager *compositionManager, const CompositionContentRequirements &requirements, bool drawFlagSet)
 Begins the composition.
 
void blitComposition (Domain *domain, Renderer3D &renderer, CompositionStack &compositionStack, CompositionManager *compositionManager, QuadDescription &backgroundQuad, const Matrix3x3 &transform, Vector2 quadSize, const Matrix4x4 *perspectiveMatrix, const Matrix4x4 *projectionMatrix)
 Blits the composition.
 
void disableCaching ()
 Disable caching.
 
void enableCaching (CachingMode mode)
 Enable caching.
 
void endComposition (Renderer3D &renderer, CompositionStack &compositionStack, CompositionManager *compositionManager)
 End final composition.
 
const GeometrygetBlitGeometry () const
 Gets the blit geometry.
 
Matrix3x3 getBlitLocalTransformation () const
 Gets the blit geometry local transformation.
 
CachingMode getCachingMode () const
 Gets the caching mode stored in the compositor.
 
const GeometrygetClearGeometry () const
 Gets the clear geometry.
 
Matrix3x3 getClearLocalTransformation () const
 Gets the local transformation of the blit geometry.
 
BrushRenderergetCompositionBrushRenderer () const
 Access composition brush renderer.
 
TextureSharedPtr getCompositionTarget () const
 Access managed composition target.
 
NodeEffect2DgetEffect () const
 Gets the active effect or null pointer.
 
NodeEffectRenderer2DgetEffectRenderer () const
 Gets the active effect renderer or null pointer if compositor has no active effect.
 
TextureSharedPtr getManagedCompositionTarget () const
 Gets the managed composition target.
 
Vector2 getUserCompositionTargetSize () const
 Gets the size of user composition target.
 
bool hasCompositionBrushRenderer () const
 Indicates whether a composition brush renderer has been created.
 
bool hasManagedCompositionTarget () const
 Indicates whether a managed composition target has been allocated.
 
bool hasUserCompositionTarget () const
 Indicates whether user composition target is set.
 
void invalidateCompositionBrush ()
 Invalidate composition brush.
 
bool isBlendCompositionRequested () const
 Indicates whether composition due to blending is requested.
 
bool isBlendModeAndChildrenCompositionRequest () const
 Indicates whether composition due to blend mode and children is requested.
 
bool isCacheValid () const
 Indicates whether or not the cache is valid.
 
bool isCompositionPotentiallyRequired () const
 Indicates whether composition can potentially be required during rendering.
 
bool isCompositionRequested () const
 Indicates whether composition is requested from code.
 
bool isCompositionRequired () const
 Indicates whether compositing the node is required.
 
bool isCompositionRequiredDuringRendering (const optional< Matrix3x3 > &transform, bool drawFlagSet) const
 Indicates whether compositing the node is required during rendering.
 
bool isForceComposition () const
 Indicates whether force composition flag is set.
 
bool isOffscreenRendering () const
 Indicates whether offscreen rendering is enabled.
 
bool isOpacityAndChildrenCompositionRequest () const
 Indicates whether composition due to opacity is requested.
 
bool isPerspectiveCompositionRequested () const
 Indicates whether composition due to perspective transform is requested.
 
bool isPotentialCompositionBitViewport () const
 Indicates whether potential composition request flag is set.
 
void onDetached ()
 Kanzi calls this function when the node that owns the compositor becomes detached.
 
void renderCompositionQuad (Domain *domain, Renderer &renderer, BrushRenderer &brushRenderer, const Texture &texture, QuadDescription &backgroundQuad, const Matrix4x4 &transform, Vector2 quadSize)
 Render composition quad.
 
void resetBlitGeometry ()
 Resets the blit geometry.
 
void resetClearGeometry ()
 Resets the clear geometry.
 
void resizeUserCompositionTarget (Vector2 compositionSize)
 Resize automatic sizes in user composition target if necessary.
 
void restoreResources (Vector2 compositionSize)
 Restore resources.
 
void setBlendCompositionRequested (bool enabled)
 Sets the blend composition request flag.
 
void setBlendModeAndChildrenCompositionRequested (bool enabled)
 Sets the opacity composition request flag.
 
void setBlitGeometry (Domain *domain, Renderer &renderer, const QuadDescription &quad)
 Sets the blit geometry for the compositor.
 
void setCacheValid (bool valid)
 Set cache validity flag.
 
void setClearGeometry (Domain *domain, Renderer &renderer, const QuadDescription &quad)
 Sets the clear geometry for the compositor.
 
void setCompositionRequested (bool enabled)
 Sets the compositing request.
 
void setEffect (NodeEffect2D *effect)
 Sets the active effect or clears the active effect with empty shared pointer.
 
void setForceComposition (bool enabled)
 Sets force composition.
 
void setOffscreenRendering (bool enabled)
 Sets the offscreen rendering flag.
 
void setOpacityAndChildrenCompositionRequested (bool enabled)
 Sets the opacity composition request flag.
 
void setPerspectiveCompositionRequested (bool enabled)
 Sets the perspective composition request flag.
 
void setPotentialCompositionBitVierport (bool enabled)
 Sets the potential composition request flag.
 
void setUserCompositionBrush (BrushSharedPtr brush)
 Sets user composition brush.
 
void setUserCompositionTarget (TextureSharedPtr texture)
 Set user composition target.
 
void updateRender (Node2D &node, const CompositionContentRequirements &requirements, optional< int > blendMode, float opacity)
 Update for rendering, recreating composition targets and brush renderers as needed.
 
 ~NodeCompositor2D ()
 Destructor.
 

Static Public Member Functions

static unique_ptr< NodeCompositor2Dcreate ()
 Creates a NodeCompositor2D.
 

Protected Member Functions

TextureSharedPtr beginFinalComposition (CompositionStack &compositionStack, CompositionManager *compositionManager, const CompositionContentRequirements &requirements, bool needsRender)
 Begins the final composition.
 
void blitFinalComposition (Domain *domain, Renderer3D &renderer, CompositionStack &compositionStack, CompositionManager *compositionManager, TextureSharedPtr renderTargetTexture, QuadDescription &backgroundQuad, const Matrix3x3 &transform, Vector2 quadSize, const Matrix4x4 *perspectiveMatrix, const Matrix4x4 *projectionMatrix)
 Blits the final composition.
 
void endFinalComposition (CompositionStack &compositionStack)
 Ends the final composition.
 
bool isRenderRequired (bool drawFlagSet) const
 Indicates whether node rendering is required.
 
 NodeCompositor2D ()
 Default constructor.
 
bool updatePersistentCompositionTarget (Node2D &node, TextureSharedPtr &managedCompositionTarget, const CompositionContentRequirements &requirements)
 Update the managed composition target to match current requirements.
 

Protected Attributes

optional< intm_blendMode
 Saved blend mode.
 
GeometryState m_blitGeometryState
 Geometry state for blits.
 
bool m_brushRenderersDirty
 Brush renderer dirty flag.
 
bool m_cacheValid
 Cache status flag.
 
CachingMode m_cachingMode
 Caching mode setting.
 
GeometryState m_clearGeometryState
 Geometry state for clears.
 
bitset< CompositingBitCountm_compositingMask
 Bit mask for states affecting whether or not the node should compose itself and its children.
 
BrushRendererPtr m_compositionBrushRenderer
 Composition brush renderer.
 
NodeEffectRenderer2DUniquePtr m_effectRenderer
 Effect renderer instance, or null if no effect is active.
 
bool m_effectRequiresCompositionBlit
 Whether the effect blit needs to be followed with composition blit.
 
CompositionBrushSharedPtr m_managedCompositionBrush
 Composition brush managed by node.
 
TextureSharedPtr m_managedCompositionTarget
 Current framebuffer.
 
bitset< PotentialCompositingBitCountm_potentialCompositingMask
 Bit mask for states affecting whether or not the node should potentially compose itself and its children.
 
optional< CompositionStatem_state
 Active composition state, or nullopt if the composition is not active.
 
BrushSharedPtr m_userCompositionBrush
 User-set composition brush.
 
TextureSharedPtr m_userCompositionTarget
 User-set composition target.
 

Detailed Description

Composition functionality for 2D nodes.

Member Enumeration Documentation

◆ CompositingBits

Enum for compositing bit flags.

Enumerator
CompositingBitUserTarget 

User composition target explicitly set.

CompositingBitBlend 

Composition due to blend mode being set.

    \since Kanzi 3.9.1 
CompositingBitCache 

Caching mode is set to enabled.

CompositingBitForce 

Force composition from property.

CompositingBitOffscreen 

Offscreen rendering.

CompositingBitBlendAndChildren 

Composition due to blending and children.

    \since Kanzi 3.9.1 
CompositingBitOpacityAndChildren 

Composition due to opacity and children.

CompositingBitPerspective 

Composition due to perspective transform and children.

CompositingBitRequest 

Custom request from code.

CompositingBitEffect 

Composition due to applied post-processing effect.

CompositingBitCount 

Number of options.

◆ PotentialCompositingBits

Enum for compositing potential bit flags.

Enumerator
PotentialCompositingBitCache 

Caching mode is set to automatic.

PotentialCompositingBitViewport 

Potential non-aligned viewport.

PotentialCompositingBitCount 

Number of options.

Constructor & Destructor Documentation

◆ ~NodeCompositor2D()

kanzi::NodeCompositor2D::~NodeCompositor2D ( )

Destructor.

◆ NodeCompositor2D()

kanzi::NodeCompositor2D::NodeCompositor2D ( )
explicitprotected

Default constructor.

Member Function Documentation

◆ create()

static unique_ptr< NodeCompositor2D > kanzi::NodeCompositor2D::create ( )
static

Creates a NodeCompositor2D.

Returns
NodeCompositor2D unique pointer.

◆ beginComposition()

bool kanzi::NodeCompositor2D::beginComposition ( Renderer3D & renderer,
CompositionStack & compositionStack,
CompositionManager * compositionManager,
const CompositionContentRequirements & requirements,
bool drawFlagSet )

Begins the composition.

Parameters
rendererRenderer to use.
compositionStackComposition stack to use.
compositionManagerComposition manager to use.
requirementsRequirements for the composition target.
drawFlagSetWhether the draw flag is set for the node or any of its descendants.
Returns
Whether to perform the rendering.
Since
Kanzi 3.9.7 consolidated composition requirements to requirements parameter.

◆ endComposition()

void kanzi::NodeCompositor2D::endComposition ( Renderer3D & renderer,
CompositionStack & compositionStack,
CompositionManager * compositionManager )

End final composition.

Parameters
rendererRenderer to use.
compositionStackComposition stack to use.
compositionManagerComposition manager to use.

◆ blitComposition()

void kanzi::NodeCompositor2D::blitComposition ( Domain * domain,
Renderer3D & renderer,
CompositionStack & compositionStack,
CompositionManager * compositionManager,
QuadDescription & backgroundQuad,
const Matrix3x3 & transform,
Vector2 quadSize,
const Matrix4x4 * perspectiveMatrix,
const Matrix4x4 * projectionMatrix )

Blits the composition.

Parameters
domainDomain to use.
rendererRenderer to use.
compositionStackComposition stack to use.
compositionManagerComposition manager to use.
backgroundQuadClip quad for background area.
transformTransform used for rendering.
quadSizeRendered quad size.
perspectiveMatrixOptional transform to use for perspective projection.
projectionMatrixOptional projection to use for perspective projection.

◆ renderCompositionQuad()

void kanzi::NodeCompositor2D::renderCompositionQuad ( Domain * domain,
Renderer & renderer,
BrushRenderer & brushRenderer,
const Texture & texture,
QuadDescription & backgroundQuad,
const Matrix4x4 & transform,
Vector2 quadSize )

Render composition quad.

Parameters
domainDomain to use.
rendererRenderer to use.
brushRendererBrush renderer to use.
textureTexture used.
backgroundQuadClip quad for background area.
transformTransform used for rendering.
quadSizeRendered quad size.

◆ getCompositionTarget()

TextureSharedPtr kanzi::NodeCompositor2D::getCompositionTarget ( ) const

Access managed composition target.

Returns
User composition target if set, otherwise the managed composition target or nullptr.

◆ resizeUserCompositionTarget()

void kanzi::NodeCompositor2D::resizeUserCompositionTarget ( Vector2 compositionSize)

Resize automatic sizes in user composition target if necessary.

Parameters
compositionSizeComposition size to resize to.

◆ onDetached()

void kanzi::NodeCompositor2D::onDetached ( )

Kanzi calls this function when the node that owns the compositor becomes detached.

◆ restoreResources()

void kanzi::NodeCompositor2D::restoreResources ( Vector2 compositionSize)

Restore resources.

Will restore all GL resources and resize render targets with automatic size.

Parameters
compositionSizeComposition size to resize to.
Since
Kanzi 3.9.5 removed renderer parameter.

◆ updateRender()

void kanzi::NodeCompositor2D::updateRender ( Node2D & node,
const CompositionContentRequirements & requirements,
optional< int > blendMode,
float opacity )

Update for rendering, recreating composition targets and brush renderers as needed.

Parameters
nodeThe node to which to attach.
blendModeOptional blend mode to select for the composition brush.
requirementsRequirements for the composition target.
opacityOpacity value that should be used for rendering.
Since
Kanzi 3.9.1 added blendMode parameter.
Kanzi 3.9.6 removed opaquenessHint parameter.
Kanzi 3.9.7 consolidated composition requirements to requirements parameter.
Kanzi 3.9.9 removed translucencyHint parameter.

◆ getCompositionBrushRenderer()

BrushRenderer * kanzi::NodeCompositor2D::getCompositionBrushRenderer ( ) const
inline

Access composition brush renderer.

◆ hasCompositionBrushRenderer()

bool kanzi::NodeCompositor2D::hasCompositionBrushRenderer ( ) const
inline

Indicates whether a composition brush renderer has been created.

Returns
If a composition brush renderer exists, true, otherwise false.

◆ setUserCompositionBrush()

void kanzi::NodeCompositor2D::setUserCompositionBrush ( BrushSharedPtr brush)
inline

Sets user composition brush.

Parameters
brushBrush to use as the composition brush.

◆ getUserCompositionTargetSize()

Vector2 kanzi::NodeCompositor2D::getUserCompositionTargetSize ( ) const

Gets the size of user composition target.

Returns
Size of composition target or zero vector.

◆ hasUserCompositionTarget()

bool kanzi::NodeCompositor2D::hasUserCompositionTarget ( ) const
inline

Indicates whether user composition target is set.

Returns
If user composition target has been set true, otherwise false.

◆ setUserCompositionTarget()

void kanzi::NodeCompositor2D::setUserCompositionTarget ( TextureSharedPtr texture)
inline

Set user composition target.

◆ invalidateCompositionBrush()

void kanzi::NodeCompositor2D::invalidateCompositionBrush ( )
inline

Invalidate composition brush.

◆ getCachingMode()

CachingMode kanzi::NodeCompositor2D::getCachingMode ( ) const
inline

Gets the caching mode stored in the compositor.

Returns
Caching mode.

◆ enableCaching()

void kanzi::NodeCompositor2D::enableCaching ( CachingMode mode)
inline

Enable caching.

Parameters
modeNew caching mode, must not be CachingModeDisabled.

◆ disableCaching()

void kanzi::NodeCompositor2D::disableCaching ( )
inline

Disable caching.

◆ isCacheValid()

bool kanzi::NodeCompositor2D::isCacheValid ( ) const
inline

Indicates whether or not the cache is valid.

Returns
True if yes, false if no.

◆ setCacheValid()

void kanzi::NodeCompositor2D::setCacheValid ( bool valid)
inline

Set cache validity flag.

Parameters
validCache status flag.

◆ isCompositionRequired()

bool kanzi::NodeCompositor2D::isCompositionRequired ( ) const
inline

Indicates whether compositing the node is required.

This query does not take draw flags into account.

Returns
If composition is required true, otherwise false.

◆ isCompositionPotentiallyRequired()

bool kanzi::NodeCompositor2D::isCompositionPotentiallyRequired ( ) const
inline

Indicates whether composition can potentially be required during rendering.

This status is in addition to the obligatory requirement.

Returns
If composition may be required during rendering, true, otherwise false.

◆ isCompositionRequiredDuringRendering()

bool kanzi::NodeCompositor2D::isCompositionRequiredDuringRendering ( const optional< Matrix3x3 > & transform,
bool drawFlagSet ) const

Indicates whether compositing the node is required during rendering.

This status is in addition to the obligatory requirement.

Parameters
transformLocal override transform for the node.
drawFlagSetWhether the draw flag is set for the node or any of its descendants.
Returns
If composition is required during rendering true, otherwise false.

◆ isCompositionRequested()

bool kanzi::NodeCompositor2D::isCompositionRequested ( ) const
inline

Indicates whether composition is requested from code.

Returns
If flag is set true, otherwise false.

◆ setCompositionRequested()

void kanzi::NodeCompositor2D::setCompositionRequested ( bool enabled)
inline

Sets the compositing request.

Parameters
enabledNew flag state.

◆ isForceComposition()

bool kanzi::NodeCompositor2D::isForceComposition ( ) const
inline

Indicates whether force composition flag is set.

Returns
If flag is set true, otherwise false.

◆ setForceComposition()

void kanzi::NodeCompositor2D::setForceComposition ( bool enabled)
inline

Sets force composition.

Parameters
enabledNew flag state.

◆ isOffscreenRendering()

bool kanzi::NodeCompositor2D::isOffscreenRendering ( ) const
inline

Indicates whether offscreen rendering is enabled.

Returns
If flag is set true, otherwise false.

◆ setOffscreenRendering()

void kanzi::NodeCompositor2D::setOffscreenRendering ( bool enabled)
inline

Sets the offscreen rendering flag.

Parameters
enabledNew flag state.

◆ isBlendCompositionRequested()

bool kanzi::NodeCompositor2D::isBlendCompositionRequested ( ) const
inline

Indicates whether composition due to blending is requested.

Returns
If flag is set true, otherwise false.
Since
Kanzi 3.9.1

◆ setBlendCompositionRequested()

void kanzi::NodeCompositor2D::setBlendCompositionRequested ( bool enabled)
inline

Sets the blend composition request flag.

Parameters
enabledNew flag state.
Since
Kanzi 3.9.1

◆ isBlendModeAndChildrenCompositionRequest()

bool kanzi::NodeCompositor2D::isBlendModeAndChildrenCompositionRequest ( ) const
inline

Indicates whether composition due to blend mode and children is requested.

Returns
If the flag is set true, otherwise false.
Since
Kanzi 3.9.1

◆ setBlendModeAndChildrenCompositionRequested()

void kanzi::NodeCompositor2D::setBlendModeAndChildrenCompositionRequested ( bool enabled)
inline

Sets the opacity composition request flag.

Parameters
enabledNew flag state.
Since
Kanzi 3.9.1

◆ isOpacityAndChildrenCompositionRequest()

bool kanzi::NodeCompositor2D::isOpacityAndChildrenCompositionRequest ( ) const
inline

Indicates whether composition due to opacity is requested.

Returns
If the flag is set true, otherwise false.
Since
Kanzi 3.9.1

◆ setOpacityAndChildrenCompositionRequested()

void kanzi::NodeCompositor2D::setOpacityAndChildrenCompositionRequested ( bool enabled)
inline

Sets the opacity composition request flag.

Parameters
enabledNew flag state.
Since
Kanzi 3.9.1

◆ isPerspectiveCompositionRequested()

bool kanzi::NodeCompositor2D::isPerspectiveCompositionRequested ( ) const
inline

Indicates whether composition due to perspective transform is requested.

Returns
If the flag is set true, otherwise false.

◆ setPerspectiveCompositionRequested()

void kanzi::NodeCompositor2D::setPerspectiveCompositionRequested ( bool enabled)
inline

Sets the perspective composition request flag.

Parameters
enabledNew flag state.

◆ isPotentialCompositionBitViewport()

bool kanzi::NodeCompositor2D::isPotentialCompositionBitViewport ( ) const
inline

Indicates whether potential composition request flag is set.

Returns
If the flag is set true, otherwise false.

◆ setPotentialCompositionBitVierport()

void kanzi::NodeCompositor2D::setPotentialCompositionBitVierport ( bool enabled)
inline

Sets the potential composition request flag.

Parameters
enabledNew flag state.

◆ getManagedCompositionTarget()

TextureSharedPtr kanzi::NodeCompositor2D::getManagedCompositionTarget ( ) const
inline

Gets the managed composition target.

Returns
Current composition target.

◆ hasManagedCompositionTarget()

bool kanzi::NodeCompositor2D::hasManagedCompositionTarget ( ) const
inline

Indicates whether a managed composition target has been allocated.

Returns
If the managed composition target exists true, otherwise false.

◆ setEffect()

void kanzi::NodeCompositor2D::setEffect ( NodeEffect2D * effect)

Sets the active effect or clears the active effect with empty shared pointer.

Since
Kanzi 3.9.0
Parameters
effectEffect instance or empty shared pointer.

◆ getEffect()

NodeEffect2D * kanzi::NodeCompositor2D::getEffect ( ) const

Gets the active effect or null pointer.

Returns
Effect instance or nullptr.
Since
Kanzi 3.9.0

◆ getEffectRenderer()

NodeEffectRenderer2D * kanzi::NodeCompositor2D::getEffectRenderer ( ) const
inline

Gets the active effect renderer or null pointer if compositor has no active effect.

Returns
NodeEffectRender2D instance or null pointer.
Since
Kanzi 3.9.0

◆ getClearGeometry()

const Geometry & kanzi::NodeCompositor2D::getClearGeometry ( ) const
inline

Gets the clear geometry.

Returns
Reference to clear geometry
Since
Kanzi 3.9.4

◆ resetClearGeometry()

void kanzi::NodeCompositor2D::resetClearGeometry ( )

Resets the clear geometry.

Since
Kanzi 3.9.4

◆ setClearGeometry()

void kanzi::NodeCompositor2D::setClearGeometry ( Domain * domain,
Renderer & renderer,
const QuadDescription & quad )

Sets the clear geometry for the compositor.

Parameters
domainDomain to use.
rendererRenderer to use.
quadQuad description.
Since
Kanzi 3.9.4

◆ getClearLocalTransformation()

Matrix3x3 kanzi::NodeCompositor2D::getClearLocalTransformation ( ) const

Gets the local transformation of the blit geometry.

Returns
Transformation that maps the geometry to the local space of the node.
Since
Kanzi 3.9.5

◆ getBlitGeometry()

const Geometry & kanzi::NodeCompositor2D::getBlitGeometry ( ) const
inline

Gets the blit geometry.

Returns
Reference to clear geometry
Since
Kanzi 3.9.4

◆ resetBlitGeometry()

void kanzi::NodeCompositor2D::resetBlitGeometry ( )

Resets the blit geometry.

Since
Kanzi 3.9.4

◆ setBlitGeometry()

void kanzi::NodeCompositor2D::setBlitGeometry ( Domain * domain,
Renderer & renderer,
const QuadDescription & quad )

Sets the blit geometry for the compositor.

Parameters
domainDomain to use.
rendererRenderer to use.
quadQuad description.
Since
Kanzi 3.9.4

◆ getBlitLocalTransformation()

Matrix3x3 kanzi::NodeCompositor2D::getBlitLocalTransformation ( ) const

Gets the blit geometry local transformation.

Returns
The local transformation mapping the geometry to node local space.
Since
Kanzi 3.9.5

◆ updatePersistentCompositionTarget()

bool kanzi::NodeCompositor2D::updatePersistentCompositionTarget ( Node2D & node,
TextureSharedPtr & managedCompositionTarget,
const CompositionContentRequirements & requirements )
protected

Update the managed composition target to match current requirements.

If the composition target does not exist or the settings required from it have changed, it is (re)created.

Parameters
nodeNode to attach to.
managedCompositionTargetExisting composition target.
requirementsRequirements for the composition target.
Returns
True if composition target was updated, false if not.
Since
In Kanzi 3.9.7, consolidated composition requirements to requirements parameter.

◆ beginFinalComposition()

TextureSharedPtr kanzi::NodeCompositor2D::beginFinalComposition ( CompositionStack & compositionStack,
CompositionManager * compositionManager,
const CompositionContentRequirements & requirements,
bool needsRender )
protected

Begins the final composition.

Parameters
compositionStackComposition stack to use.
compositionManagerComposition manager to use.
requirementsRequirements for the composition target.
needsRenderWhether to perform node rendering.
Returns
Render target to use.
Since
Kanzi 3.9.0.
Kanzi 3.9.7 consolidated composition requirements to requirements parameter.

◆ endFinalComposition()

void kanzi::NodeCompositor2D::endFinalComposition ( CompositionStack & compositionStack)
protected

Ends the final composition.

Parameters
compositionStackComposition stack to use.

◆ blitFinalComposition()

void kanzi::NodeCompositor2D::blitFinalComposition ( Domain * domain,
Renderer3D & renderer,
CompositionStack & compositionStack,
CompositionManager * compositionManager,
TextureSharedPtr renderTargetTexture,
QuadDescription & backgroundQuad,
const Matrix3x3 & transform,
Vector2 quadSize,
const Matrix4x4 * perspectiveMatrix,
const Matrix4x4 * projectionMatrix )
protected

Blits the final composition.

Parameters
domainDomain to use.
rendererRenderer to use.
compositionStackComposition stack to use.
compositionManagerComposition manager to use.
renderTargetTextureRender target texture used.
backgroundQuadClip quad for background area.
transformTransform used for rendering.
quadSizeRendered quad size.
perspectiveMatrixOptional transform to use for perspective projection.
projectionMatrixOptional projection to use for perspective projection.

◆ isRenderRequired()

bool kanzi::NodeCompositor2D::isRenderRequired ( bool drawFlagSet) const
protected

Indicates whether node rendering is required.

Returns
Whether to perform node rendering.
Since
Kanzi 3.9.0

Member Data Documentation

◆ m_managedCompositionTarget

TextureSharedPtr kanzi::NodeCompositor2D::m_managedCompositionTarget
protected

Current framebuffer.

◆ m_cachingMode

CachingMode kanzi::NodeCompositor2D::m_cachingMode
protected

Caching mode setting.

◆ m_cacheValid

bool kanzi::NodeCompositor2D::m_cacheValid
protected

Cache status flag.

◆ m_userCompositionBrush

BrushSharedPtr kanzi::NodeCompositor2D::m_userCompositionBrush
protected

User-set composition brush.

◆ m_userCompositionTarget

TextureSharedPtr kanzi::NodeCompositor2D::m_userCompositionTarget
protected

User-set composition target.

◆ m_managedCompositionBrush

CompositionBrushSharedPtr kanzi::NodeCompositor2D::m_managedCompositionBrush
protected

Composition brush managed by node.

◆ m_compositionBrushRenderer

BrushRendererPtr kanzi::NodeCompositor2D::m_compositionBrushRenderer
protected

Composition brush renderer.

◆ m_blitGeometryState

GeometryState kanzi::NodeCompositor2D::m_blitGeometryState
protected

Geometry state for blits.

Since
Kanzi 3.9.5

◆ m_clearGeometryState

GeometryState kanzi::NodeCompositor2D::m_clearGeometryState
protected

Geometry state for clears.

Since
Kanzi 3.9.5

◆ m_blendMode

optional<int> kanzi::NodeCompositor2D::m_blendMode
protected

Saved blend mode.

Since
Kanzi 3.9.1

◆ m_brushRenderersDirty

bool kanzi::NodeCompositor2D::m_brushRenderersDirty
protected

Brush renderer dirty flag.

◆ m_compositingMask

bitset<CompositingBitCount> kanzi::NodeCompositor2D::m_compositingMask
protected

Bit mask for states affecting whether or not the node should compose itself and its children.

◆ m_potentialCompositingMask

bitset<PotentialCompositingBitCount> kanzi::NodeCompositor2D::m_potentialCompositingMask
protected

Bit mask for states affecting whether or not the node should potentially compose itself and its children.

◆ m_state

optional<CompositionState> kanzi::NodeCompositor2D::m_state
protected

Active composition state, or nullopt if the composition is not active.

◆ m_effectRenderer

NodeEffectRenderer2DUniquePtr kanzi::NodeCompositor2D::m_effectRenderer
protected

Effect renderer instance, or null if no effect is active.

◆ m_effectRequiresCompositionBlit

bool kanzi::NodeCompositor2D::m_effectRequiresCompositionBlit
protected

Whether the effect blit needs to be followed with composition blit.


The documentation for this class was generated from the following file: